Optimal. Leaf size=152 \[ -\frac{2 a c^3 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}+\frac{2 c^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}-\frac{8 \sqrt{2} c^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}+\frac{6 c^3 \tan (e+f x)}{f \sqrt{a \sec (e+f x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.228497, antiderivative size = 152, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {3904, 3887, 479, 582, 522, 203} \[ -\frac{2 a c^3 \tan ^3(e+f x)}{3 f (a \sec (e+f x)+a)^{3/2}}+\frac{2 c^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}-\frac{8 \sqrt{2} c^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a}}\right )}{\sqrt{a} f}+\frac{6 c^3 \tan (e+f x)}{f \sqrt{a \sec (e+f x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3904
Rule 3887
Rule 479
Rule 582
Rule 522
Rule 203
Rubi steps
\begin{align*} \int \frac{(c-c \sec (e+f x))^3}{\sqrt{a+a \sec (e+f x)}} \, dx &=-\left (\left (a^3 c^3\right ) \int \frac{\tan ^6(e+f x)}{(a+a \sec (e+f x))^{7/2}} \, dx\right )\\ &=\frac{\left (2 a^3 c^3\right ) \operatorname{Subst}\left (\int \frac{x^6}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=-\frac{2 a c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac{\left (2 a c^3\right ) \operatorname{Subst}\left (\int \frac{x^2 \left (6+9 a x^2\right )}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{3 f}\\ &=\frac{6 c^3 \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)}}-\frac{2 a c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}+\frac{\left (2 c^3\right ) \operatorname{Subst}\left (\int \frac{18 a+21 a^2 x^2}{\left (1+a x^2\right ) \left (2+a x^2\right )} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{3 a f}\\ &=\frac{6 c^3 \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)}}-\frac{2 a c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}-\frac{\left (2 c^3\right ) \operatorname{Subst}\left (\int \frac{1}{1+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}+\frac{\left (16 c^3\right ) \operatorname{Subst}\left (\int \frac{1}{2+a x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{f}\\ &=\frac{2 c^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)}}\right )}{\sqrt{a} f}-\frac{8 \sqrt{2} c^3 \tan ^{-1}\left (\frac{\sqrt{a} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)}}\right )}{\sqrt{a} f}+\frac{6 c^3 \tan (e+f x)}{f \sqrt{a+a \sec (e+f x)}}-\frac{2 a c^3 \tan ^3(e+f x)}{3 f (a+a \sec (e+f x))^{3/2}}\\ \end{align*}
Mathematica [A] time = 1.31573, size = 166, normalized size = 1.09 \[ \frac{4 c^3 \cos \left (\frac{e}{2}\right ) \cos (e) \cot \left (\frac{1}{2} (e+f x)\right ) \sec ^2(e+f x) \left (11 \cos (e+f x)-5 \cos (2 (e+f x))+3 \cos ^2(e+f x) \sqrt{\sec (e+f x)-1} \tan ^{-1}\left (\sqrt{\sec (e+f x)-1}\right )-12 \sqrt{2} \cos ^2(e+f x) \sqrt{\sec (e+f x)-1} \tan ^{-1}\left (\frac{\sqrt{\sec (e+f x)-1}}{\sqrt{2}}\right )-6\right )}{3 f \left (\cos \left (\frac{e}{2}\right )+\cos \left (\frac{3 e}{2}\right )\right ) \sqrt{a (\sec (e+f x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.299, size = 372, normalized size = 2.5 \begin{align*} -{\frac{{c}^{3}}{6\,af\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) }\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}} \left ( -3\,{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{3/2}\sqrt{2}\sin \left ( fx+e \right ) \cos \left ( fx+e \right ) -24\,\cos \left ( fx+e \right ) \sin \left ( fx+e \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{3/2}\ln \left ({\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\cos \left ( fx+e \right ) +1 \right ) } \right ) -3\,\sqrt{2}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{2}\sin \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }\sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}} \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{3/2}\sin \left ( fx+e \right ) -24\,\ln \left ({\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{-2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\cos \left ( fx+e \right ) +1 \right ) } \right ) \left ( -2\,{\frac{\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }} \right ) ^{3/2}\sin \left ( fx+e \right ) +40\, \left ( \cos \left ( fx+e \right ) \right ) ^{2}-44\,\cos \left ( fx+e \right ) +4 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 4.49942, size = 1342, normalized size = 8.83 \begin{align*} \left [\frac{12 \, \sqrt{2}{\left (a c^{3} \cos \left (f x + e\right )^{2} + a c^{3} \cos \left (f x + e\right )\right )} \sqrt{-\frac{1}{a}} \log \left (\frac{2 \, \sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sqrt{-\frac{1}{a}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + 3 \, \cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) - 1}{\cos \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1}\right ) - 3 \,{\left (c^{3} \cos \left (f x + e\right )^{2} + c^{3} \cos \left (f x + e\right )\right )} \sqrt{-a} \log \left (\frac{2 \, a \cos \left (f x + e\right )^{2} + 2 \, \sqrt{-a} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a \cos \left (f x + e\right ) - a}{\cos \left (f x + e\right ) + 1}\right ) + 2 \,{\left (10 \, c^{3} \cos \left (f x + e\right ) - c^{3}\right )} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right )}{3 \,{\left (a f \cos \left (f x + e\right )^{2} + a f \cos \left (f x + e\right )\right )}}, -\frac{2 \,{\left (3 \,{\left (c^{3} \cos \left (f x + e\right )^{2} + c^{3} \cos \left (f x + e\right )\right )} \sqrt{a} \arctan \left (\frac{\sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right ) -{\left (10 \, c^{3} \cos \left (f x + e\right ) - c^{3}\right )} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \sin \left (f x + e\right ) - \frac{12 \, \sqrt{2}{\left (a c^{3} \cos \left (f x + e\right )^{2} + a c^{3} \cos \left (f x + e\right )\right )} \arctan \left (\frac{\sqrt{2} \sqrt{\frac{a \cos \left (f x + e\right ) + a}{\cos \left (f x + e\right )}} \cos \left (f x + e\right )}{\sqrt{a} \sin \left (f x + e\right )}\right )}{\sqrt{a}}\right )}}{3 \,{\left (a f \cos \left (f x + e\right )^{2} + a f \cos \left (f x + e\right )\right )}}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} - c^{3} \left (\int \frac{3 \sec{\left (e + f x \right )}}{\sqrt{a \sec{\left (e + f x \right )} + a}}\, dx + \int - \frac{3 \sec ^{2}{\left (e + f x \right )}}{\sqrt{a \sec{\left (e + f x \right )} + a}}\, dx + \int \frac{\sec ^{3}{\left (e + f x \right )}}{\sqrt{a \sec{\left (e + f x \right )} + a}}\, dx + \int - \frac{1}{\sqrt{a \sec{\left (e + f x \right )} + a}}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]